-- GENERATED SPELL FOR [Mugdorg] --


function spell0_20726(pUnit, Event) --@Bloodmaul Intoxication,n/a--
pUnit:FullCastSpellOnTarget(35240,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20726', 25000, 1)
end

function spell1_20726(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20726', 3000, 1)
end

function spell2_20726(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_20726', 3000, 1)
end

function spell3_20726(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20726', 0, 1)
end

function Sorts_20726(pUnit, Event)
local choix_sorts_20726 = math.random(0, 3)
if choix_sorts_20726 == 0 then
pUnit:RegisterEvent('spell0_20726', 1, 1)
end
if choix_sorts_20726 == 1 then
pUnit:RegisterEvent('spell1_20726', 1, 1)
end
if choix_sorts_20726 == 2 then
pUnit:RegisterEvent('spell2_20726', 1, 1)
end
if choix_sorts_20726 == 3 then
pUnit:RegisterEvent('spell3_20726', 1, 1)
end
end

function mob20726_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20726', math.random(1500, 3000), 1)
end

function mob20726_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20726_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20726_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20726, 1, 'mob20726_Action')
RegisterUnitEvent(20726, 2, 'mob20726_Leave')
RegisterUnitEvent(20726, 3, 'mob20726_Kill')
RegisterUnitEvent(20726, 4, 'mob20726_Die')
